<? 
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); 
header("Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" ); 
header("Cache-Control: no-cache, must-revalidate" ); 
header("Pragma: no-cache" );
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
	<meta name="author" content="Jeevan" />
    <link rel="stylesheet" media="screen,projection" type="text/css" href="<?=base_url()?>css/style.css" />
    <link rel="stylesheet" media="screen,projection" type="text/css" href="<?=base_url()?>css/accmenu.css" />
    <link rel="stylesheet" media="screen,projection" type="text/css" href="<?=base_url()?>css/content.css" />
    <link rel="stylesheet" media="screen,projection" type="text/css" href="<?=base_url()?>css/datagrid.css" />
    <script src="<?=base_url()?>js/jquery-1.6.4.min.js" type="text/javascript"></script>
    <script src="<?=base_url()?>js/jquery.validate.js" type="text/javascript"></script>
    <script src="<?=base_url()?>js/additional-methods.js" type="text/javascript"></script>
    <script src="<?=base_url()?>js/jquery.validate.messages.js" type="text/javascript"></script>
    <script src="<?=base_url()?>js/jquery.prettyPhoto.js" type="text/javascript"></script>
    <link href="<?=base_url()?>css/prettyPhoto.css" rel="stylesheet" type="text/css" />
    <?
    if( isset($enableJqueryUI) && $enableJqueryUI ==  true ) {
    ?>
    <script src="<?=base_url()?>js/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
    <link href="<?=base_url()?>css/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
    <?
    }	
    ?>
    <?
    if(isset($enablejhtml) && $enablejhtml == true) {
    ?>
    <script type="text/javascript" src="<?=base_url()?>js/jHtmlArea-0.7.0.js"></script>
    <link rel="Stylesheet" type="text/css" href="<?=base_url()?>css/jHtmlArea.css" /> 
    <?        
    }
    ?>
    <script src="<?=base_url()?>js/fn.js" type="text/javascript"></script>
    <script>
        $(document).ready( function() {
            $(window).resize( function() {
                setWinSize();
            });
            setWinSize();
            
            //slides the element with class "menu_body" when paragraph with class "menu_head" is clicked
            $("#firstpane p.menu_head").click(function()
            {
                $(this).addClass("selected").next("div.menu_body").slideToggle(350).siblings("div.menu_body").slideUp(350);
                 $(this).siblings().removeClass("selected");
            });
            
            $("#firstpane p.selected").trigger("click");
            
            $("input[type='reset']").click( function() {
                $('label.error').remove();
            });
                    
        });
        
        function setWinSize() {
            $minheight = 500;
            $winheight = $(window).height();
            $topheight = $("#top").height();
            $footerhirght = $("#foot").height();
            $colminheight = $winheight - $topheight - $footerhirght;
            $colminheight = $colminheight - 8; //  Subtract #mid margin
            if($colminheight > $minheight) {
                $("#left").css("height",$colminheight+"px");
                $("#contentcontainer").css("height",($colminheight)+"px");  // Subtract #contetn padding    
            } else {
                $("#left").css("height",$minheight+"px");
                $("#contentcontainer").css("height",($minheight)+"px");  // Subtract #contetn padding
            }
            
            if($(".datagridcontainer")) {
                $(".datagridcontainer").css("width",(800)+'px');
                $(".datagridcontainer").css("width",($("#contentcontainer").width()-20)+'px');
            }
        }
        
        function placeError(error, element) {
            var errorplace = element.parent().next();
            error.appendTo(errorplace);
        }        
        
    </script>
    <? $user = $this->session->userdata('user'); ?>
	<title>Admin Panel</title>
</head>

<body>

    <div id="main">
    
        <div id="top">
            <div id="title">
                <strong>Montezine</strong> - Nursery of Doha
            </div>
            <div id="subtitle">
                Control Panel
            </div>
            <div id="user_area">
                User: 
                <strong><?=$user['name']?></strong>
                <strong>
                    <a href="<?=base_url('admin/logout')?>">Logout</a>
                </strong>
            </div>
        </div>
        
        <div id="mid">
            <table cellspacing="2" cellpadding="0" border="0">
                <tr>
                    <td id="left">
                        <? 
						$this->load->view('admin/elements/sidenav');
						?>
                    </td>
                    <td id="content">            